<%--
  Created by IntelliJ IDEA.
  User: win
  Date: 2020/10/29
  Time: 23:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>文件上传
    </title>
</head>
<body>
<%--
    文件上传三要素：
        1. 表单提交方式必须是post
        2. 表单的enctype必须为：mulitipart/form-data
        3. 表单中必须有文件上传项
--%>
<form method="post" enctype="multipart/form-data" action="${pageContext.request.contextPath}/upload">
    <input type="file" name="upload">
    <br>
    <input type="text" name="name">
    <br>
    <input type="text" name="password">
    <br>
    <input type="submit" value="文件上传">
</form>

<img src="/upload/16ea4a544e0844acb9592c16849f29fd_JML100新人.jpg">
</body>
</html>
